package com.gqb.wangyi;

import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
import java.util.Queue;
import java.util.Scanner;
import java.util.Stack;

public class wangyitwo {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		while (scanner.hasNext()) {
			int r=scanner.nextInt();
			int[][] p=new int[4][2];
			for (int i = 0; i < p.length; i++) {
				p[i][0]=scanner.nextInt();
				p[i][1]=scanner.nextInt();
			}
			List<Double> dis=countDis(p);
			int count=0;
			for (Double double1 : dis) {
				if(r>=double1){
					count++;
				}
			}
			System.out.println(count+"x");
		}
		scanner.close();
	}
	public static List<Double> countDis(int[][] p){
		
		List<Double> dis=new ArrayList<>();
		for (int i = 0; i < p.length-1; i++) {
			dis.add(Math.hypot(Math.abs(p[i][0]-p[3][0]), Math.abs(p[i][1]-p[3][1])));
		}
		return dis;
	}
}
